// 引入vue
import Vue from 'vue'
// 引入vue-router
import VueRouter from 'vue-router'
// 引入组件
import home from '@/views/Home'
import list from '@/views/List'
import goodList from '@/views/GoodList'
import my from '@/views/My'
// 调用插件
Vue.use(VueRouter)
// 创建路由对象
const router = new VueRouter({
    routes:[
        {
            path: '/',
            redirect: '/home'
        },
        {
            path: '/home',
            component: home,
            name: 'homo'
        },
        {
            path: '/list',
            component: list,
            name: 'listo'
        },
        {
            path: '/goodlist',
            component: goodList,
            name: 'goodelisto'
        },
        {
            path: '/my',
            component: my,
            name: 'maie'
        }
    ]
})
// 对外暴露
export default router